package com.xiaoq;

import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Indexed;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * @author xinpeng created on 16/7/23-上午8:30.
 */
public class MongoEntity {

    @Id
    protected String id;

    @JsonIgnore
    @Indexed
    protected Long createdAt;

    @JsonIgnore
    @Indexed
    protected Long updatedAt;


    public MongoEntity() {
    	long cur = System.currentTimeMillis();
        createdAt = cur;
        updatedAt = cur;
    }


	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}


	public Long getCreatedAt() {
		return createdAt;
	}


	public void setCreatedAt(Long createdAt) {
		this.createdAt = createdAt;
	}


	public Long getUpdatedAt() {
		return updatedAt;
	}


	public void setUpdatedAt(Long updatedAt) {
		this.updatedAt = updatedAt;
	}
    
    
    
}
